#pragma once
#include <QWidget>
#include <QListView>
#include <QStringListModel>

class PlayListWidget : public QWidget
{
	Q_OBJECT

public:
	PlayListWidget(QWidget* parent = Q_NULLPTR);
	~PlayListWidget();

	void setPlayList(QStringListModel* listModel);
	QStringList getPlaylist() const;
	void setPlay(bool Play) { is_play_ = Play; }
	bool getPlay() const { return is_play_; }

private slots:
	void on_Item_doubleClicked(const QModelIndex& index);

signals:
	void sig_doubleClickFileName(const QString& fileName);

private:
	QListView* m_pListView = nullptr;
	QStringListModel* string_list_model_ = nullptr;
	bool is_play_ = false;
};


